package com.fone.player.client;

import java.util.List;

import org.simpleframework.xml.Attribute;
import org.simpleframework.xml.Element;
import org.simpleframework.xml.ElementList;
import org.simpleframework.xml.Root;

/**
 * @author 刘昆 (liukun@100tv.com)
 * @since 2014-04-22
 */

@Root(strict = false)
public class CollectionlsRst extends Rst {

	@Root(strict = false)
	public static class Cnts {

		@ElementList(inline = true, entry = "cnt", required = false)
		public List<Cnt> cntList;

		@Override
		public String toString() {
			return "Cnts [cntList=" + cntList + "]";
		}

	}

	@Root(strict = false)
	public static class Cnt {
		/** 显示名称 */
		@Attribute(required = false)
		public String name;

		/** videoId 用于同步记录 */
		@Attribute(required = false)
		public int videoid;

		/** 更新信息 显示电视剧的时候提示更新到多少集 */
		@Attribute(required = false)
		public String updateinfo;

		/** 多少季 */
		@Attribute(required = false)
		public String season;
		/** 总时长 */
		@Attribute(required = false)
		public long mins;

		/** 更新时间，用于排序，long */
		@Attribute(required = false)
		public long udate;

		/** 来源，func=1时有效 */
		@Attribute(required = false)
		public String from;

		/** 内容品质：例如5表示五星，func=1、3时有效 */
		@Attribute(required = false)
		public String quality;

		/** 是否高清：0高清\1非高清，func=1、3时有效 */
		@Attribute(required = false)
		public int hd;

		/** 主演，func=1、3时有效 */
		@Attribute(required = false)
		public String actor;

		/** 取消收藏/删除播放记录的地址 */
		@Attribute(required = false)
		public String rurl;

		/** 详情页地址，func=1、3时有效 */
		@Attribute(required = false)
		public String durl;

		/** 显示图片地址，带时间戳 */
		@Attribute(required = false)
		public String pic;

		/** 类型 */
		@Attribute(required = false)
		public int type;

		/** 播放时间点，func=2时有效 */
		@Attribute(required = false)
		public long tp;

		/** 播放地址，func=2时有效 */
		@Attribute(required = false)
		public String url;

		/** 0：否，1：是 */
		@Attribute(required = false)
		public int vip;

		@Attribute(required = false)
		public String weibourl;
		
		/** 原始播放页地址 **/
		@Attribute(required = false)
		public String ourl;
		
		/** 0:直接播放  1：去原网页 **/
		@Attribute(required = false)
		public int toply;
		
		/** 显示播放按钮 0：不显示   1：显示(默认) **/
		@Attribute(required = false)
		public int btnply = 1;
		
		/** 显示下载按钮 0：不显示   1：显示(默认) **/
		@Attribute(required = false)
		public int btndown = 1;
		
		

		@Override
		public String toString() {
			return "Cnt [name=" + name + ", udate=" + udate + ", from=" + from
					+ ", quality=" + quality + ", hd=" + hd + ", actor="
					+ actor + ", rurl=" + rurl + ", durl=" + durl + ", pic="
					+ pic + ", type=" + type + ", tp=" + tp + ", url=" + url
					+ ", vip=" + vip + "]";
		}

	}

	@Root(strict = false)
	public static class Rp {
		/** 当前页码 */
		@Attribute(required = false)
		public int p;

		/** 总页数 */
		@Attribute(required = false)
		public int m;

		/** 下一页url */
		@Attribute(required = false)
		public String nurl;

		@Override
		public String toString() {
			return "Rp [p=" + p + ", m=" + m + ", nurl=" + nurl + "]";
		}

	}

	/** 服务器地址. */
	@Element(required = false)
	public String host;

	/** 资源服务器地址. */
	@Element(required = false)
	public String shost;

	/** 函数功能类型：1取回收藏2 取回播放记录3取回电视看. */
	@Element(required = false)
	public String func;

	/** 总记录数func=2时有效. */
	@Element(required = false)
	public String total;

	/** 电影总记录数func=2时有效. */
	@Element(required = false)
	public String total_1;

	/** 电视剧总记录数func=2时有效. */
	@Element(required = false)
	public String total_2;

	/** 动漫总记录数func=2时有效. */
	@Element(required = false)
	public String total_3;

	/** 综艺总记录数func=2时有效. */
	@Element(required = false)
	public String total_4;

	/** 其它类型总记录数func=2时有效. */
	@Element(required = false)
	public String total_0;

	/** 收藏列表. */
	@Element(required = false)
	public Cnts cnts;

	/**  */
	@Element(required = false)
	public Rp rp;

	@Override
	public String toString() {
		return "CollectionlsRst [host=" + host + ", shost=" + shost + ", func="
				+ func + ", total=" + total + ", total_1=" + total_1
				+ ", total_2=" + total_2 + ", total_3=" + total_3
				+ ", total_4=" + total_4 + ", total_0=" + total_0 + ", cnts="
				+ cnts + ", rp=" + rp + "]";
	}

}
